from django.db import models
from django.contrib.auth.models import User

# Create your models here.

class Course(models.Model):
    title = models.CharField(max_length=100)
    info = models.CharField(max_length=400)    
    teacher = models.ForeignKey(User, related_name="Teacher")
    Subscribers=models.ManyToManyField(User, null=True, blank=True)
class Request(models.Model):
    sender=models.ForeignKey(User, related_name="student")
    reciever=models.ForeignKey(User)
    course=models.ForeignKey(Course)
    accepted=models.BooleanField()
   
#class UserProfile(models.Model):
 #  user = models.OneToOneField(User, related_name="user")
  # courses= models.ManyToManyField(Course)     